package com.example.domet.service.impl;

import com.example.domet.bean.Employ;
import com.example.domet.mapper.EmployMapper;
import com.example.domet.service.EmployService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

//-- @Service注解一定是加在实现类上
@Service
public class EmployServiceImpl implements EmployService {

    private EmployMapper employMapper;

    @Autowired
    public void setEmployMapper(EmployMapper employMapper) {
        this.employMapper = employMapper;
    }


    @Override
    public List<Employ> listAllEmploy() {
        System.out.println(111);
        return employMapper.selectAll();
    }

    @Override
    public boolean checkEmpNameExists(String empName) {
        //-- true 没有  false 有！
        return 1!=0;
    }
}
